package com.common.test;

public class OhgFrontLogin extends OperationBase {

	public OhgFrontLogin(UITestBase tb){
		super(tb);
	}
	
    public void frontlogin(String username, String password) throws Exception{
    	log.info("===start login Operation===");
        FrontLoginPage flp = new FrontLoginPage(tb);
        switchToDefaultContent();
        waitForElementExist(flp.loginLnk);
        flp.loginLnk.click();
        waitForElementExist(flp.accountinput);
        flp.accountinput.type(username);
        pause(1000);
        flp.passwordinput.clear();
        flp.passwordinput.type(password);
        pause(1500);
        flp.loginbutton.click();
        waitForPageContainsStr(username);
        log.info("===end login Operation===");    
    }
}
